﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Fitness.SpokePage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Fitness"
    xmlns:common="using:Fitness.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.TopAppBar>
        <AppBar x:Name="appBar2" Padding="10,0,10,0" Background="#FFD7D7D7" BorderBrush="{x:Null}" MinHeight="88" d:IsHidden="True">
            <Grid Margin="0" >
                <StackPanel Margin="110,10,0,10" Orientation="Horizontal" HorizontalAlignment="Left" Height="90">
                    <Button x:Name="btnTopApp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Tapped="btnTopApp_Tapped_1">
                        <Image Width="85" Height="89" Source="Assets/AppTop1.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                        <Image Width="85" Height="89" Source="Assets/AppTop2.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1" Tapped="btnTopApp3_Tapped_1">
                        <Image Width="85" Height="89" Source="Assets/AppTop3.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                        <Image Width="85" Height="89" Source="Assets/AppTop4.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1"  Tapped="btnTopApp5_Tapped_1">
                        <Image Width="85" Height="89" Source="Assets/AppTop5.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp6" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                        <Image Width="85" Height="89" Source="Assets/AppTop6.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>
	<common:LayoutAwarePage.Background>
		<ImageBrush ImageSource="Assets/bg.png"/>
	</common:LayoutAwarePage.Background>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid x:Name="MainGrid" Style="{StaticResource LayoutRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Calculators" Style="{StaticResource PageHeaderTextStyle}" Margin="0,0,300,40"/>
            <Grid x:Name="LogoMain" HorizontalAlignment="Right" Height="89" VerticalAlignment="Center" Width="212" Grid.Column="1" Margin="0,0,40,0">
            	<Grid.Background>
            		<ImageBrush ImageSource="Assets/MainLogo.png"/>
            	</Grid.Background>
            </Grid>
        </Grid>
        <ScrollViewer x:Name="scrollViewer" Grid.Row="1" Style="{StaticResource HorizontalScrollViewerStyle}">
        	<Grid x:Name="Contaner" Height="631" Margin="120,0,0,0" VerticalAlignment="Top">
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="474"/>
        			<ColumnDefinition Width="474"/>
        			<ColumnDefinition Width="474"/>
        			<ColumnDefinition Width="50"/>
        		</Grid.ColumnDefinitions>
        		<Grid x:Name="Slider1" VerticalAlignment="Top" Width="381" HorizontalAlignment="Left">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="60"/>
        				<RowDefinition Height="558*"/>
        			</Grid.RowDefinitions>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Body Mass Index Calculator" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="24" FontWeight="Light"/>
        			<Grid x:Name="FirstGrid" Margin="0" Grid.RowSpan="2" Grid.Row="1" VerticalAlignment="Top">
        				<Grid.Background>
        					<ImageBrush ImageSource="Assets/HubPage/calCatBg.png"/>
        				</Grid.Background>
        				<Grid.RowDefinitions>
        					<RowDefinition Height="452"/>
        					<RowDefinition Height="40"/>
        				</Grid.RowDefinitions>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Title}" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold"/>
        				<Grid x:Name="InnerGrid" Margin="0,25,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="auto"/>
        					</Grid.ColumnDefinitions>
        					<Slider Grid.ColumnSpan="2" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Margin="24,0,0,0" Value="16"/>
        					<Slider HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Grid.Column="1" Margin="27,0,0,0" Value="36"/>
        					<Slider HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Grid.Column="2" Margin="36,0,0,0" Value="7"/>
        				</Grid>
        				<StackPanel Grid.Row="1" Margin="0,12" VerticalAlignment="Center" Height="16" Orientation="Horizontal">
        					<Grid x:Name="TextSliderButtom1" Margin="0,0,27,0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Height (in cms)" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Margin="8,0,0,0"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom2" Margin="0,0,60,0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Weight (in kg)" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom2_Copy" Margin="0,0,10,0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Age" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32"/>
        					</Grid>
        				</StackPanel>
        				<Grid x:Name="Arrow" HorizontalAlignment="Right" Height="33" VerticalAlignment="Bottom" Width="27" Margin="0,0,21,0">
        					<Image Source="Assets/Arrow.png" Margin="0,0,11,0"/>
        				</Grid>
        			</Grid>
        		</Grid>
        		<Grid x:Name="Slider2" VerticalAlignment="Top" Grid.Column="1">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="60"/>
        				<RowDefinition Height="558*"/>
        			</Grid.RowDefinitions>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Calorie Burn Calculator" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="24" FontWeight="Light"/>
        			<Grid x:Name="FirstGrid1" Margin="0" Grid.RowSpan="2" Grid.Row="1" VerticalAlignment="Top" Width="366" HorizontalAlignment="Left">
        				<Grid.Background>
        					<ImageBrush ImageSource="Assets/HubPage/calCatBg.png"/>
        				</Grid.Background>
        				<Grid.RowDefinitions>
        					<RowDefinition Height="452"/>
        					<RowDefinition Height="40"/>
        				</Grid.RowDefinitions>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Title}" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold"/>
        				<Grid x:Name="InnerGrid1" Margin="0,25,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="auto"/>
        					</Grid.ColumnDefinitions>
        					<Slider Grid.ColumnSpan="2" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Margin="24,0,0,0"/>
        					<Slider HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Grid.Column="1" Margin="27,0,0,0"/>
        				</Grid>
        				<StackPanel Grid.Row="1" Margin="0,12" VerticalAlignment="Center" Height="16" Orientation="Horizontal">
        					<Grid x:Name="TextSliderButtom3" Margin="0,0,36,0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Height (in cms)" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Margin="8,0,0,0"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom4" Margin="0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Duration" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom2_Copy1" Margin="0,0,10,0" HorizontalAlignment="Left"/>
        				</StackPanel>
        				<Grid x:Name="Arrow1" HorizontalAlignment="Right" Height="33" VerticalAlignment="Bottom" Width="27" Margin="0,0,21,0">
        					<Image Source="Assets/Arrow.png" Margin="0,0,11,0"/>
        				</Grid>
        			</Grid>
        		</Grid>
        		<Grid x:Name="Slider3" VerticalAlignment="Top" Grid.Column="2">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="60"/>
        				<RowDefinition Height="558*"/>
        			</Grid.RowDefinitions>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Heart Rate Calculator" VerticalAlignment="Bottom" FontFamily="Segoe UI" FontSize="24" FontWeight="Light" Margin="0,0,0,28"/>
        			<Grid x:Name="FirstGrid2" Margin="0" Grid.RowSpan="2" Grid.Row="1" VerticalAlignment="Top" Width="366" HorizontalAlignment="Left">
        				<Grid.Background>
        					<ImageBrush ImageSource="Assets/HubPage/calCatBg.png"/>
        				</Grid.Background>
        				<Grid.RowDefinitions>
        					<RowDefinition Height="452"/>
        					<RowDefinition Height="40"/>
        				</Grid.RowDefinitions>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Title}" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold"/>
        				<Grid x:Name="InnerGrid2" Margin="0,25,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="100"/>
        						<ColumnDefinition Width="auto"/>
        					</Grid.ColumnDefinitions>
        					<Slider Grid.ColumnSpan="2" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderStyle1}" Margin="24,0,0,0"/>
        					<Grid Grid.Column="1" Margin="21,0,0,0">
        						<Grid.RowDefinitions>
        							<RowDefinition Height="20"/>
        							<RowDefinition Height="100"/>
        							<RowDefinition Height="102"/>
        							<RowDefinition Height="107"/>
        							<RowDefinition Height="50"/>
        						</Grid.RowDefinitions>
        						<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Vigorous" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Margin="-29,0,0,0"/>
        						<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Average" VerticalAlignment="Bottom" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Grid.Row="1" Margin="-25,0,0,0"/>
        						<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Novice" VerticalAlignment="Bottom" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Grid.Row="2" Margin="-20,0,0,0" Grid.RowSpan="2"/>
        						<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Beginner" VerticalAlignment="Bottom" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Grid.Row="2" Margin="-32,0,0,101.96" Grid.RowSpan="2"/>
        					</Grid>
        					<Slider HorizontalAlignment="Right" ScrollViewer.HorizontalScrollBarVisibility="Auto" Orientation="Vertical" Style="{StaticResource SliderInner}" Grid.Column="1" Margin="0"/>
        				</Grid>
        				<StackPanel Grid.Row="1" Margin="0,12" VerticalAlignment="Center" Height="16" Orientation="Horizontal">
        					<Grid x:Name="TextSliderButtom5" Margin="0,0,36,0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Age" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Margin="35,0,0,0"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom6" Margin="0" HorizontalAlignment="Left">
        						<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Fitness Level" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="12" Foreground="#FFA3DE32" Margin="53,0,0,0"/>
        					</Grid>
        					<Grid x:Name="TextSliderButtom2_Copy2" Margin="0,0,10,0" HorizontalAlignment="Left"/>
        				</StackPanel>
        				<Grid x:Name="Arrow2" HorizontalAlignment="Right" Height="33" VerticalAlignment="Bottom" Width="27" Margin="0,0,21,0">
        					<Image Source="Assets/Arrow.png" Margin="0,0,11,0"/>
        				</Grid>
        			</Grid>
        		</Grid>
        	</Grid>
        </ScrollViewer>
        <Grid x:Name="snaped" HorizontalAlignment="Left" Height="100" Opacity="0" VerticalAlignment="Top" Width="100">
        	<TextBlock x:Name="textBlock" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Please switch to full screen to view the details." VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="24" Margin="19.21,352.077,18.79,351.923" Foreground="White" Opacity="0"/>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="Contaner">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>101,0,0,0</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="scrollViewer">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LogoMain">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="snaped" d:IsOptimized="True" To="1"/>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RowSpan)" Storyboard.TargetName="snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Int32>2</x:Int32>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>NaN</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>NaN</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<HorizontalAlignment>Stretch</HorizontalAlignment>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<VerticalAlignment>Stretch</VerticalAlignment>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock" d:IsOptimized="True" To="1"/>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="pageTitle">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>0,0,5,40</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
